require_not_empty
Asserts that a list is non-null and non-empty.
Return
the passed value
, but with type cast from list<T>?
to list<T>
Since
0.9.0
Parameters
the list to be checked.
the message for the exception to be thrown if the list is null
or empty
Throws
if the provided list is null
or empty
Asserts that a set is non-null and non-empty.
Return
the passed value
, but with type cast from set<T>?
to set<T>
Since
0.9.0
Parameters
the set to be checked
the message for the exception to be thrown if the set is null
or empty
Throws
if the provided set is null
or empty
Asserts that a map is non-null and non-empty.
Return
the passed value
, but with type cast from map<K,V>?
to map<K,V>
Since
0.9.0
Parameters
the map to be checked
the message for the exception to be thrown if the map is null
or empty
Throws
if the provided map is null
or empty
Asserts that a value is non-null.
Return
the passed value
, but with type cast from T?
to T
Since
0.9.0
Parameters
the nullable value to be checked
the message for the exception to be thrown if the value is null
Throws
if the provided value is null